<h1 id="chapter-1"><a class="header" href="#chapter-1">Chapter 1</a></h1>
<h2 id="some-title"><a class="header" href="#some-title">Some title</a></h2>
<p>See <a href="#some-title-1">other</a></p>
<p>See <a href="#some-title">this</a></p>
<p>See <a href="#some-title">this anchor only</a></p>
<div style="break-before: page; page-break-before: always;"></div>
<h1 id="chapter-2"><a class="header" href="#chapter-2">Chapter 2</a></h1>
<h2 id="some-title-1"><a class="header" href="#some-title-1">Some title</a></h2>
<p>See <a href="#some-title">other</a></p>
<p>See <a href="#some-title-1">this</a></p>
<p>See <a href="#some-title-1">this anchor only</a></p>
<p><a href="#some-title">Works with HTML extension too</a></p>